import React, { Component } from 'react'
import { Icon } from 'react-vant';
import axios from '../utils/request'

export default class AddDangAn extends Component {



    go() {
        this.props.history.go(-1)
    }

    tomy() {
        this.props.history.goBack(-1)
    }

    componentDidMount() {
        axios.post('/api/adddangan',).then(res => {
            console.log(res);

        })
    }

    render() {
        return (
            <div className="wrap">
                <header>
                    <div className="detail">
                        <Icon name="arrow-left" className='icons' onClick={() => { this.go() }} />
                        <span>新建档案</span>
                    </div>
                    <main>
                        <div className="add">
                            <p><label>姓名:</label><input type="text" /></p>
                            <p><label>年龄:</label><input type="text" /></p>
                            <p><label>性别:</label><input type="text" /></p>
                            <p><label>血型:</label><input type="text" /></p>
                            <button onClick={() => { this.tomy() }}>保存</button>
                        </div>
                    </main>
                </header>
            </div>
        )
    }
}
